package com.onec.service.api.dto.response.trade;

import com.onec.service.api.dto.request.gateway.BizContent;
import com.onec.service.api.dto.response.BaseResponse;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author onec
 * 订单返回下游明确信息！
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class OnlineOrderResp extends BaseResponse {

    public String service;

    /**
     * (机构)商户号
     */
    public String outCode;
    /**
     * (机构)商户号
     */
    public String merchantNo;
    /**
     * (机构)商户简称
     */
    public String merchantName;

    /**
     * 商户门店地址
     */
    public String address;

    /**
     * 联行号
     */
    public String bankCode;

    /**
     * 结算类型 :0对公，1对私
     */
    public String settleType;
    /**
     * 手机号
     */
    public String phone;

    /**
     * 结算卡
     */
    public String cardNo;
    /**
     * 姓名
     */
    public String name;
    /**
     * 身份号
     */
    public String idCard;
    /**
     *
     */
    public String province;
    /**
     *
     */
    public String city;
    /**
     * 身份号
     */
    public String country;

    /**
     * 交易描述
     */
    public String message;


    public String rate;

    public String fee;

    public String product;

    public String businessNo;

    /**
     * 机构订单号
     */
    public String externalNum;

    /**
     * 通道订单号
     */
    public String tradeNum;

    /**
     * 平台流水号
     */
    public String serialNum;
    /**
     * 交易金额
     */
    public String amount;

    /**
     * 姓名
     */
    public String userName;

    /**
     * 交易金额
     */
    public String frontUrl;

    public String callBackUrl;
    /**
     * 产品信息
     */
    public String productInfo;

    public String areaCode;

    public String mcc;
    /**
     * 代理编号
     */
    public String agentNo;
    /**
     * 订单状态
     */
    public String status;

    /**
     * 返回给下游订单信息！
     *
     * @param bizContent
     */
    public OnlineOrderResp(BizContent bizContent) {
        this.service = bizContent.getService();
        this.outCode = bizContent.getOutCode();
        this.merchantNo = bizContent.getMerchantNo();
        this.merchantName = bizContent.getMerchantName();
        this.address = bizContent.getAddress();
        this.bankCode = bizContent.getBankCode();
        this.settleType = bizContent.getSettleType();
        // 待考虑
        //this.phone = bizContent.getPhone();
        //this.cardNo = bizContent.getCardNo();
        //this.name = bizContent.getName();
        //       this.idCard = bizContent.getIdCard();
        this.province = bizContent.getProvince();
        this.city = bizContent.getCity();
        this.country = bizContent.getCountry();

        this.product = bizContent.getProduct();
        this.businessNo = bizContent.getBusinessNo();
        this.externalNum = bizContent.getExternalNum();
        this.tradeNum = bizContent.getTradeNum();
        //this.serialNum = serialNum;
        this.amount = bizContent.getAmount();
//        this.userName = userName;
//        this.frontUrl = frontUrl;
//        this.callBackUrl = callBackUrl;
//        this.productInfo = productInfo;
//        this.areaCode = areaCode;
//        this.mcc = mcc;
//        this.agentNo = agentNo;
    }

}
